

cc.Class({
    extends: cc.Component,

    properties: {
        fishNum: cc.Label,
        fishPrice: cc.Label,
        fish_bg: cc.Sprite,
        fishAtlas: cc.SpriteAtlas, /* 所有鱼的图集 */
    },

    // LIFE-CYCLE CALLBACKS:
    init: function (playerInfo) {
        var _id=playerInfo.id + 1;
        this.fishNum.string = playerInfo.num;
        this.fishPrice.string = playerInfo.price;

        this.fish_bg.node.getComponent(cc.Sprite).spriteFrame = this.fishAtlas.getSpriteFrame("f_" +_id);

    },
    onLoad () {},

    start () {

    },

    // update (dt) {},
});
